#include<iostream>
#include<unordered_map>
using namespace std;
const int N = 73;
typedef long long LL;
unordered_map<LL, int>mp;
LL f[N];
LL s[N];
LL n;
int main()
{
	f[1] = 1;
	f[2] = 1;
	s[1] = 1;
	s[2] = 2;
	int ans = 0;
	for (int i = 3; ; i++) {
		f[i] = f[i - 1] + f[i - 2];
		s[i] = s[i - 1] + f[i];
		if (f[i] > 1e15) {
			ans = i;
			//cout << f[i] << endl;
			break;
		}
	}
	LL ans1 = 0;
	//for (int i = 65; i <= 72; i++) {
	//	ans1 += f[i];
	//}
	//cout << ans1 << endl;
	for (int i = 1; i <= 73; i++) {
		for (int j = i; j < 73; j++) {
			mp[s[j] - s[i - 1]] = 1;
		}
	}
	while (cin >> n) {
		if (mp[n]) {
			cout << "YES" << endl;
		}
		else {
			cout << "NO" << endl;
		}
	}
	return 0;
}
